﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Masquage
{
    class Program
    {
        static void Main(string[] args)
        {
            int X = 5;
            ClasseMere objM = new ClasseMere();
            objM.f(X);
            Console.WriteLine("objM.f(5) : X = " + objM.x);
            ClasseFille objF = new ClasseFille();
            objF.f(5);
            Console.WriteLine("obfF.f(5) : X = " + objF.x);
        }
    }
    public class ClasseMere
    {
        public int x = 10;
        public void f(int a)
        { x += a; }
    }
    public class ClasseFille : ClasseMere
    {
        int y = 20;
        public new void f(int a) //masquage
        { x += a * 10 + y;
            Console.WriteLine("Classe Fille");
        }
    }
}
